package  
{
	import flash.text.TextField;
	import flash.text.TextFormat;
	
	/**
	 * Champ de texte
	 * @author Jean-Marie PETIT@hsh
	 */
	public class Panneau extends TextField 
	{
		public function Panneau(mur:Mur) 
		{
			mur.addChild(this);
			defaultTextFormat = new TextFormat("verdana", 12, 0x660066, true, false, false, "", "", "center");
			multiline = true;
			wordWrap = true;
			type = "dynamic";
			selectable = false;
			poser(mur.lg + 10, 10, mur.stage.stageWidth - mur.lg-20, 100);
			colorier(0x999999, 0xffff00);
		}
		
		public function colorier(fond:int, bord:int):void 
		{
			backgroundColor = fond;
			background = fond > -1;
			borderColor = bord;
			border = bord > -1;
		}
		
		public function ecrire(...msg:Array):void 
		{
			text = msg.join("\n");
		}
		
		public function poser(px:int, py:int, lg:int, ht:int):void 
		{
			x = px;
			y = py;
			width = lg;
			height = ht;			
		}		
	}
}